/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aufgabe1;

/**
 * 
 * @author benjamin
 */
public class Programm {
	/**
	 * @param args
	 *            the command line arguments
	 */
	public static void main(String[] args) {

		BackPackFactory<Item> bpf = new BackPackFactory();

		/*
		 * how many items, minimum size of item, maximum size of item, minimum
		 * value of item, maximum value of item
		 */
		Item[] items = bpf.generateRandomItems(50, 10, 30, 10, 200);

		int backPackSize = 80;
		System.out.println("Start test - BackPack size: " + backPackSize
				+ ", with 50 random items:");
		System.out
				.println("----------------------------------------------------------------");

		BackPack<Item> bp1 = bpf.pack(PackType.RANDOM, items, backPackSize);
		System.out.println(bp1);
		System.out.println("  " + bpf.getPerfData());

		BackPack<Item> bp2 = bpf.pack(PackType.BACKTRACKING, items,
				backPackSize);
		System.out.println(bp2);
		System.out.println("  " + bpf.getPerfData());

		BackPack<Item> bp3 = bpf.pack(PackType.BACKTRACKING_H1, items,
				backPackSize);
		System.out.println(bp3);
		System.out.println("  " + bpf.getPerfData());

		System.out
				.println("---------------------------------------------------------------");

	}
}
